package com.sskj.mine.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.bean.QrCodeBean;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.ui.activity.ExtensionActivity;


public class ExtensionActivityPresenter extends BasePresenter<ExtensionActivity> {
    //获取用户二维码  code值
    public void getUrlData() {
        httpService.getUrlCode()
                .tag(this)
                .execute(new JsonCallBack<HttpData<QrCodeBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<QrCodeBean>> response) {
                        HttpData<QrCodeBean> httpData = response.body();
                        if (httpData.getStatus() == HttpConfig.OK) {
                            if (httpData.getData() != null) {
                                mView.onSuccessUi(httpData.getData());
                            }
                        }
                    }
                });
    }
}
